package com.whcoding.designpatterns.pattern.proxy;

/**
 * @program: spring-boot-learning
 * @description: 代理主题角色
 * @author: whcoding
 * @create: 2022-09-21 09:33
 **/
public class TeacherDaoProxy implements ITeacherDao {

	/**
	 * 目标对象
	 */
	private ITeacherDao target;


	public TeacherDaoProxy(ITeacherDao target){
		this.target=target;
	}

	@Override
	public void teach() {
		System.out.println("静态代理开始前的方法");
		target.teach();
		System.out.println("静态代理结束后的方法");
	}
}
